import java.util.Random;
import java.util.UUID;

/**
 * 随机数
 */
public class Demo01 {
    public static void main(String[] args) {
        Random random=new Random();
        for (int i=0;i<10;i++){
            int num=random.nextInt(100);  //100以内的随机数
            System.out.println(num);
        }
        System.out.println("----------------------------");
        int num1= (int) Math.round(Math.random()*100);
        System.out.println(num1);

        System.out.println("------------------------------");
        String str=UUID.randomUUID().toString(); // 对象转成字符串 toString();
        System.out.println(str);

    }
}
